<template>
    <div>
        <div id="RSTJB" :style="{ width: '400px', height: '300px' }"></div>
    </div>
</template>
<script>
export default {
    mounted() {
    this.drawLine();
  },
   methods: {
    drawLine() {
      let myChart = this.$echarts.init(document.getElementById("RSTJB"));
      var option = {
        tooltip: {
          trigger: "item",
        },
        legend: {
          top: "bottom",
        },
        series: [
          {
            type: "pie",
            radius: "50%",
            data: [
              { value: 500, name: "事假" },
              { value: 500, name: "病假" },
              { value: 500, name: "年假" },
              { value: 500, name: "其他" },
            ],
            emphasis: {
              itemStyle: {
                shadowBlur: 10,
                shadowOffsetX: 0,
                shadowColor: "rgba(0, 0, 0, 0.5)",
              },
            },
          },
        ],
      };

      option && myChart.setOption(option);
      
    },
  },
}
</script>
<style scoped>

</style>